package com.acerola.downloader.util;

import java.io.File;

/**
 * @program: MultithreadedDownloader
 * @description:
 * @author: Acerola
 * @create: 2022-05-11 16:25
 **/
public class FileUtils {
    /**
     * 获取本地文件的大小
     */
    public static long getFileContentLength(String path) {
        File file = new File(path);

        return file.exists() && file.isFile() ? file.length() : 0;
    }
}
